package com.itheima.service;

import com.github.pagehelper.PageInfo;
import com.itheima.domain.User;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Transactional(readOnly = true)
public interface UserService {
    //添加
    @Transactional(readOnly = false)
    public boolean save(User user);

    // 修改
    @Transactional(readOnly = false)
    public boolean update(User user);

    //  删除
    @Transactional(readOnly = false)
    public boolean delete(Integer uuid);

    // 查单个
    public User get(Integer uuid);

    //查全部
    public PageInfo<User> getAll(int page, int size);

    //登录
    public User login(String userNAME, String PASSWORD);
}
